package service.impl;

import java.util.List;

import pojo.Warehouse;
import service.WarehouseManager;
import dao.WarehouseDao;
import dao.factory.DaoFactory;

public class WarehouseManagerImpl implements WarehouseManager {
	
	private WarehouseDao warehouseDao;
	
	public WarehouseManagerImpl(){
		warehouseDao = DaoFactory.getWarehouseDaoInstance();
	}
	
	@Override
	public List<Warehouse> getAllWarehouses() {
		return warehouseDao.findAll();
	}

	@Override
	public Warehouse getWarehouse(String id) {
		return warehouseDao.load(id);
	}

}
